<script setup lang="ts">
import { ref } from 'vue'

interface Staff {
  id: number
  name: string
  position: string
  department: string
  phone: string
  status: string
}

const staffList = ref<Staff[]>([
  {
    id: 1,
    name: '王医生',
    position: '主治医师',
    department: '医疗部',
    phone: '13800138001',
    status: '在职'
  },
  {
    id: 2,
    name: '李护士',
    position: '护士长',
    department: '护理部',
    phone: '13800138002',
    status: '在职'
  }
])
</script>

<template>
  <div class="staff-management">
    <el-card>
      <template #header>
        <div class="card-header">
          <span>员工管理</span>
          <el-button type="primary">添加员工</el-button>
        </div>
      </template>

      <el-table :data="staffList" style="width: 100%">
        <el-table-column prop="name" label="姓名" />
        <el-table-column prop="position" label="职位" />
        <el-table-column prop="department" label="部门" />
        <el-table-column prop="phone" label="联系电话" />
        <el-table-column prop="status" label="状态" />
        <el-table-column label="操作" width="200">
          <template #default="scope">
            <el-button size="small">编辑</el-button>
            <el-button size="small" type="danger">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<style scoped lang="scss">
.staff-management {
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
</style>